package com.tuocent.dagv2.service;

import com.alibaba.fastjson.JSONObject;
import com.tuocent.dagv2.common.AjaxResult;
import com.tuocent.dagv2.entity.Task;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpSession;
import org.springframework.ui.Model;

import java.util.Map;

/**
 * <p>
 * 任务管理 服务类
 * </p>
 *
 * @author Vincent
 * @since 2025-07-22
 */
public interface ITaskService extends IService<Task> {

    String taskInfo(Model model);

    AjaxResult getTaskInfo(String pid, Integer page, Integer limit);

    String setTaskInfo(Model model, String id, String pid);

    AjaxResult saveTaskInfo(HttpSession session, Task data);

    AjaxResult delTaskInfo(String id);

    String setTaskStart(Model model, String id);

    AjaxResult taskStart(Map<String, Object> data);

    AjaxResult taskFinish(Map<String, Object> data);

    String setUserTask(Model model, String userId);

    AjaxResult getUserTask(String pid, String userId);

    AjaxResult getUserProjectTask(String pid, String userId);

    AjaxResult saveUserTask(JSONObject data);

    String setTaskFinish(Model model, String id);

    AjaxResult getUserTaskInfo(HttpSession session, String pid, Integer page, Integer limit);

    Task getTask(String pid, String tid);
 
}
